package com.springStudy.beans.aware.demo1;

import org.springframework.beans.factory.BeanNameAware;
import org.springframework.stereotype.Component;

/**
 * spring bean中的 aware技术实现原理
 * org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#invokeAwareMethods(java.lang.String, java.lang.Object)
 */
@Component
public class BeanNameAwareDemo  implements BeanNameAware {
    String beanName ;

    @Override
    public void setBeanName(String name) {
        beanName = name;
    }
}
